# -*- coding: utf-8 -*-
# @File  : easyquotation_data.py
# @Author: David
# @Date  : 2022/1/1
# @Desc  :

import easyquotation


def get_stock_data(stock_code):
    """获取股票数据"""
    quotation = easyquotation.use("qq")  # 新浪 ['sina'] 腾讯 ['tencent', 'qq']
    data = quotation.stocks(stock_code)
    if data is None:
        return

    return data


if __name__ == "__main__":
    print(get_stock_data(['603828', '000970']))
    # quotation = easyquotation.use("qq")  # 新浪 ['sina'] 腾讯 ['tencent', 'qq']
    # re = quotation.real('603828')
    # print(re)